//
//  BeautyModel.swift
//  TestBankActor
//
//  Created by 罗万能 on 2025/6/17.
//

import SwiftData
import Foundation

enum DownloadStatus: Equatable,Codable{
    case notStart
    case downloading(progress: Double)
    case completed
    case failed(errorMsg: String)
}
@Model class BeautyModel {
    var id: UUID
    var remoteUrl: URL
    var localUrl: URL?
    var status: DownloadStatus
    var downloadedProgress: Double
    var resumeData: Data?
    init(id: UUID = UUID(), remoteUrl: URL) {
        self.id = id
        self.remoteUrl = remoteUrl
        self.localUrl = nil
        self.status = .notStart
        self.downloadedProgress = 0
        self.resumeData = nil
        
    }
    
}
